package com.infore.exchange.main.emums;


/**
 * @author: wule
 * 因子编码枚举
 * @date: 2020/11/9 18:06
 */
public enum FactorDataEnum {

    w22001("w22001","Petroleum","石油类","mg/L"),
    a01008("a01008","GUSTDIR","风向","deg"),
    w02006("w02006","ACC","细菌总数/菌落总数","个/L"),
    a21003("a21003","NO","一氧化氮","μg/m³"),
    w24005("w24005","CCl4","四氯化碳","mg/L"),
    w20117("w20117","Cr6+","铬(六价铬)","mg/L"),
    w2011701("w20117","Cr6+","六价铬","mg/L"),
    w01003("w01003","TD","浑浊度","NTU"),
    w21007("w21007","HNO3","硝酸盐","mg/L"),
    a21005("a21005","CO","一氧化碳","mg/m³"),
    w01017("w01017","BOD5","生化需氧量","mg/L"),
    w010171("w01017","BOD5","五日生化需氧量","mg/L"),
    w21001("w21001","TN","总氮","mg/L"),
    w91004("w91004","IR","碘化物","mg/L"),
    a21026("a21026","SO2","SO₂","μg/m³"),
    w21016("w21016","(CN)2","氰化物","mg/L"),
    w21022("w21022","CI","氯化物","mg/L"),
    w20141("w20141","As","砷","mg/L"),
    a05024("a05024","O3","O₃","μg/m³"),
    a05025("a05025","O3_8H","O₃_8H","μg/m³"),
    w20121("w20121","Ni","镍","mg/L"),
    w20123("w20123","Zn","锌","mg/L"),
    w20122("w20122","Cu","铜","mg/L"),
    w01009("w01009","DO","溶解氧","mg/L"),
    w20120("w20120","Pb","铅","mg/L"),
    w91001("w91001","TC","透明度","cm"),
    w21003("w21003","NH3N","氨氮","mg/L"),
    w01001("w01001","pH","pH","无量纲"),
    a99054("a99054","VOC","总挥发性有机物","mg/m³"),
    w20111("w20111","Hg","汞","mg/L"),
    w91005("w91005","TONE","色度","度"),
    w01018("w01018","COD","化学需氧量","mg/L"),
    w21038("w21038","SO","硫酸盐","mg/L"),
    w21006("w21006","NaNO2","亚硝酸盐","mg/L"),
    CORDR("CORDR","CORDR","化学需氧量","mg/L"),
    a21004("a21004","NO2","NO₂","μg/m³"),
    w01010("w01010","WT","水温","℃"),
    w20116("w20116","Cr","铬","mg/L"),
    a01002("a01002","HUMIDITY","湿度","%"),
    w91003("w91003","AI","铝","mg/L"),
    a34004("a34004","PM25","PM₂.₅","μg/m³"),
    w20124("w20124","Mn","锰","mg/L"),
    w91002("w91002","TID","总硬度","mg/L"),
    w01016("w01016","Chla","叶绿素a","μg/L"),
    w19002("w19002","SDS","阴离子表面活性剂","mg/L"),
    a01007("a01007","GUSTSPEED","风速","m/s"),
    w01019("w01019","CODmn","高锰酸盐指数","mg/L"),
    w21019("w21019","Sulfide","硫化物","mg/L"),
    a34002("a34002","PM10","PM₁₀","μg/m³"),
    w21017("w21017","F","氟化物","mg/L"),
    a01006("a01006","PRESSURE","气压","hpa"),
    w02004("w02004","TC","总大肠菌群","个/L"),
    w01014("w01014","COND","电导率","uS/cm"),
    w25003("w25003","C7H8","甲苯","mg/L"),
    w01006("w01006","TDS","溶解性总固体","mg/L"),
    w20125("w20125","Fe","铁","mg/L"),
    w20128("w20128","Se","硒","mg/L"),
    w24004("w24004","CHCl3","三氯甲烷","mg/L"),
    w21011("w21011","TP","总磷","mg/L"),
    w25002("w25002","C6H6","苯","mg/L"),
    w02003("w02003","FC","粪大肠菌群","个/L"),
    w20115("w20115","Cd","镉","mg/L"),
    w23002("w23002","VP","挥发酚","mg/L"),
    a01001("a01001","TEMPERATURE","温度","℃"),
    a06001("a06001","AP","降水量","mm"),
    a21002("a21002","NOx","氮氧化物","μg/m³"),
    w91006("w91006","NA","钠","mg/L"),
    //污染源排口
    a34013("a34013","a34013","烟尘","μg/m³"),
    a01013("a01013","a01013","烟气压力","kPa"),
    a19001("a19001","a19001","氧气含量","%"),
    a00000("a00000","a00000","废气","m³/s"),
    a01011("a01011","a01011","烟气流速","m/s"),
    a01012("a01012","a01012","烟气温度","℃");

    private String code;
    private String factor;
    private String name;
    private String unit;

    private FactorDataEnum(String code , String factor , String name , String unit){
        this.code = code;
        this.factor = factor;
        this.name = name;
        this.unit = unit;
    }
    public String getCode(){
        return this.code;
    }
    public String getFactor(){
        return this.factor;
    }
    public String getName(){
        return this.name;
    }
    public String getUnit(){
        return this.unit;
    }

    public static String getNameToCode(String name){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getName().equalsIgnoreCase(name)) {
                return qp.getCode();
            }
        }
        return name;
    }

    public static String getFactorToCode(String factor){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getFactor().equalsIgnoreCase(factor)) {
                return qp.getCode();
            }
        }
        return factor;
    }

    public static String getFactorToName(String factor){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getFactor().equalsIgnoreCase(factor)) {
                return qp.getName();
            }
        }
        return factor;
    }

    public static String getCodeToName(String code){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getCode().equalsIgnoreCase(code)) {
                return qp.getName();
            }
        }
        return code;
    }

    public static String getCodeToFactor(String code){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getCode().equalsIgnoreCase(code)) {
                return qp.getFactor();
            }
        }
        return code;
    }
    public static String getFactorToUnit(String factor){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getFactor().equalsIgnoreCase(factor)) {
                return qp.getUnit();
            }
        }
        return factor;
    }

    public static String getCodeToUnit(String code){
        for (FactorDataEnum qp : FactorDataEnum.values()) {
            if (qp.getCode().equalsIgnoreCase(code)) {
                return qp.getUnit();
            }
        }
        return code;
    }

}
